<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
		<title>我的消息</title>
		<link href="__PUBLIC__/index/css/idea.css" type="text/css" rel="stylesheet">
		<script type="text/javascript" src="__PUBLIC__/index/js/jquery-1.8.1.js"></script>
		<style type="text/css">
			.login .top .name {
				text-align: center;
				margin-bottom: 10px
			}
			
			.login .top .name img {
				vertical-align: middle
			}
			
			.login .top .name span {
				color: #FFF;
				margin-left: 8px
			}
		</style>
	</head>

	<body>
		<div class="login">
			<div class="top">
				<div class="bian">
					<a href="{:U('Gj/update_index')}"><img src="__PUBLIC__/index/image/bianji.png" width="103" height="35" /></a>
				</div>
				<div class="login-title">
					<p><img src="{$img}" style="border-radius:50%;" width="110" height="110"></p>
				</div>
				<div class="name">
					<?php if($da==1){?><img src="__PUBLIC__/index/image/zuan.png" width="20" height="20">
					<?php }?><span>{$nickname}</span></div>
				<ul>
					<li>
						<a href="{:U('Gj/m_status')}">
							<?php if($m_status==0){ ?><img src="__PUBLIC__/index/image/deail.png">
							<?php } ?>
							<?php if($m_status==1){ ?><img src="__PUBLIC__/index/image/coupon/deail2.png">
							<?php } ?>
						</a>
						<p><img src="__PUBLIC__/index/image/asas.png" width="15" height="15"></p>
					</li>
					<li>
						<a href="{:U('Gj/coupon_list')}"><img src="__PUBLIC__/index/image/youh.png"></a>
					</li>
					<li>
						<a href="https://payapp.weixin.qq.com/life/index?showwxpaytitle=1&exportkey=AdwmP9WcSgv7n%2BDFA%2F5EeB4%3D&clientversion=26031732&devicetype=android-22&pass_ticket=8BbXQS13EITPqoFsFioDJ9twPymaitnStoMlgOG1EUczWCbF%2F%2BtenYWB%2Bbuyjvhm#/"><img src="__PUBLIC__/index/image/fuwu1.png"></a>
					</li>
					<li>
						<a href="{:U('Gj/kefu')}"><img src="__PUBLIC__/index/image/kefu.png"></a>
					</li>
				</ul>
			</div>
			<div class="gao">
				<p>公告：</p>
				<marquee scrollamount="3" direction="left" class="gun">{$con}</marquee>
			</div>
			<div class="qing">
				<ul>
					<volist name="arr" id="data">
						<li>
							<div class="bgbg"></div>
							<p class="time">
								<?php echo date('m-d',$data['sendtime']); ?>&nbsp;&nbsp;
								<?php echo date('H:i',$data['sendtime']); ?>
							</p>
							<if condition="$data['type'] eq '0'">
								<div class="hide">{$data.content}</div>
								<div class="buttom">查看详情</div>
							</if>
							<!--
								<if condition="$data['type'] eq '1'">
								<div class="show">{$data.content}</div>
								<div class="pinjia" did="{$data.id}">点击评价</div>
							</if>
							<if condition="$data['type'] eq '2'">
								<div class="show">{$data.content}</div>
								<div class="pinjiaw" did="{$data.id}">评价完毕</div>
							</if>
							-->
							<if condition="$data['type'] neq '0'">
							<div class="show">{$data.content}</div>
							<div class="pinjia" did="{$data.id}" d_st="{$data['type']}">
									<if condition="$data['type'] eq '1'">点击评价</if>
									<if condition="$data['type'] eq '2'">评价完毕</if>
							</div>
							</if>
						</li>
					</volist>

				</ul>
			</div>

			<div class="tui">
				<a href="{:U('Gj/close')}">退出登录</a>
			</div>

			<div class="pj">
				<div class="pjd">
					<h2>客服评价</h2>
					<input type="hidden" id="did" />
					<textarea id="pj" rows="5" placeholder="请输入对客服的评价" style="color: #000;"></textarea>
					<div class="plybtn">
						<span class="tjpj">评价</span>
						<span class="gb">关闭</span>
					</div>
					<!--<div class="tjpj">评价</div>
					<div class="gb">关闭</div>-->
				</div>
			</div>
			
			
			<!--<div class="pj">
				<div class="pjd">
					<h2>留言板</h2>
					<input type="hidden" id="did" />
					<textarea id="pj" rows="5" placeholder="您好，请您留言,最多三十个字哟" style="color: #000;" maxlength="30"></textarea>
					<div class="plybtn">
						<span id="liu">留言</span>
						<span id="close">关闭</span>
					</div>
				</div>
			</div>-->
			
			
			
			
			
			
			
		</div>
	</body>
	<script type="text/javascript">
		$(document).ready(function(e) {
			var height = document.documentElement.clientHeight;
			var width = document.documentElement.clientWidth;
			$(".login").css({
				"height": height,
				"width": width
			});

			open()

			function open() {
				$('.buttom').click(function() {
					$(this).text('关闭详情').addClass('buttomhide').removeClass('buttom');
					$(this).prev('.hide').addClass("show").removeClass("hide");
					$(this).unbind();
					close();
				});
			}

			function close() {
				$('.buttomhide').click(function() {
					$(this).text('查看详情').addClass('buttom').removeClass('buttomhide');
					$(this).prev('.show').addClass("hide").removeClass("show");
					$(this).unbind();
					open();
				})
			}
			
			$('.pinjia').click(function(){
				var st = $(this).attr('d_st');
				var dat = {id:$(this).attr('did')};
				$('#did').val(dat.id);
				var url = "{:U('Gj/pingjia')}";
				if(st==1){
					$("#pj").val(''); 
					$('.tjpj').show();
				}else{
					$.post(url,dat,function(obj){
						if(obj.s){
							$("#pj").val(obj.m); 
							$('.tjpj').hide();
						}else{
							alert(obj.m);
						}
					},'json');
				}
				$('.pj').show(); 
			});
			$('.gb').click(function() { $('.pj').hide();  });
			$('.tjpj').click(function(){
				var url = "{:U('Gj/pingjia')}";
				var txt =$('#pj').val();
				if(txt==""){
					alert("评价内容不能为空");
					return false;
				}
				var dat = {id:$('#did').val(),txt:txt};
				$.post(url,dat,function(obj){	
					   alert(obj.m);
						if(obj.s){
							location.reload();
						}
					},'json');
			});
			/*
			$('.gb').bind("click", function() {
				$('.pj').hide();
			});
			$('.pinjia').bind("click", function() {
				$id = $(this).attr("did");

				$('#did').val($id);
				$('.pj').show(); 
				var $qwe = $(this);
				tj($qwe);
				//$(this).unbind();
			});
			wan();

			function wan() {
				$('.pinjiaw').bind("click", function() {
					$id = $(this).attr("did");
					$data = { id: $id };
					$url = "{:U('Gj/pingjia')}";
					$.post($url, $data, function(obj) {
						if(obj.s == 1) {
							$('.pj').show();
							$('.tjpj').hide();
							$("#pj").attr("disabled", "disabled").val(obj.m); 
						}
					})
				});
			}

			function tj(qwe) {
				$('.tjpj').bind("click", function() {
					$id = $('#did').val();
					$txt = $('#pj').val();
					$data = { id: $id, txt: $txt };
					$url = "{:U('Gj/pingjia')}";
					$.post($url, $data, function(obj) {
						if(obj.s == 1) {
							$('.pj').hide();
							alert(obj.m);
							$(qwe).addClass('pinjiaw').removeClass('pinjia').text("评价完毕");
							wan();
						} else {
							alert(obj.m);
						}
					})
				});
			}
			*/
		});
	</script>

</html>